<style scoped>
    .wrapper {
        background: #eee;
        padding: 1px;
    }
    .wrapper-header {
        position: fixed;
        width: 100%;
        top: 0;
        right: 0;
        z-index: 1000;
    }
    .wrapper-header-nav-logo {
        height: 60px;
        float: left;
        font-size: 20px;
        margin-right:20px;
        background: #2d8cf0;
        color: #fff;
        padding: 0 10px;
    }
    .wrapper-header-nav-logo img {
        height: 100%;
    }
    .wrapper-container {
        margin: 70px 10px 15px;
    }
    .wrapper-footer {
        margin-top:20px;
        padding: 10px 20px;
    }
</style>
<template>
    <div class="wrapper">
        <div class="wrapper-header">
            <Menu mode="horizontal" theme="light" @on-select="changeMenu" :active-name="currentPageName">
                <span class="wrapper-header-nav-logo">
                    <Icon size="24" type="flash"></Icon> phpAnalysis
                </span>
                <!--MenuItem name="default">
                    <Icon type="fireball"></Icon>控制台
                </MenuItem-->
                <MenuItem name="request">
                    <Icon type="grid"></Icon>全部请求
                </MenuItem>
                <!--Submenu>
                    <template slot="title">
                        <Icon type="settings"></Icon>管理
                    </template>
                    <MenuItem name="3-1">应用管理</MenuItem>
                </Submenu-->
            </Menu>
        </div>
        <div class="wrapper-container">
            <keep-alive>
                <router-view></router-view>
            </keep-alive>
        </div>
        <div class="wrapper-footer">
            <p>© 2018 <span style="color:#2d8cf0"><Icon type="flash"></Icon>phpAnalysis</span> MIT License 当前呈现版本 0.1.0-dev </p>
            <p><span style="color:#cc0000">当前版本为开发版本, 严禁部署到生产环境中！</span></p>
            <p style="margin:10px 0 5px; color: #999;">基于 Nimble 0.9.0, iView 2.7.4, Vue 2.5.2, vue-router 3.0.1 构建</p>
        </div>
    </div>
</template>
<script>
    import './css/common.css';
    export default {
        data() {
            return {
                phpAnalysis: 'phpAnalysis}}>'
            };
        },
        methods: {
            changeMenu(active) {
                this.$router.push({
                    name: active
                });
            }
        },
        computed: {
            currentPageName() {
                return this.$router.currentRoute.name;
            }
        }
    }
</script>